
#ifdef FLASH_CODE_HEADER

static const uint32_t flash_code_STM32F10X_OPT[110] = 
{
    0XE00ABE00,0X062D780D,0X24084068,0XD3000040,0X1E644058,0X1C49D1FA,0X2A001E52,0X4770D1F2,
    0X4603B510,0X4C5E2000,0X485E6020,0X485E6060,0X485C6060,0X485C60A0,0X462060A0,0XF01069C0,
    0XD1080F04,0X5055F245,0X60204C58,0X60602006,0X70FFF640,0X200060A0,0X4601BD10,0X69004850,
    0X7080F420,0X61104A4E,0X69004610,0X0080F040,0X20006110,0X484A4770,0XF0406900,0X49480020,
    0X46086108,0XF0406900,0X61080040,0XF64AE003,0X494620AA,0X48426008,0XF01068C0,0XD1F60F01,
    0X6900483F,0X0020F020,0X6108493D,0X69004608,0X0010F040,0XF6456108,0X493D20A5,0XE0038008,
    0X20AAF64A,0X60084939,0X68C04835,0X0F01F010,0X4833D1F6,0XF0206900,0X49310010,0X46086108,
    0XF01068C0,0XD0060F14,0X68C04608,0X0014F040,0X200160C8,0X20004770,0X4601E7FC,0X69004828,
    0X0020F040,0X61104A26,0X69004610,0X0040F040,0XE0036110,0X20AAF64A,0X60104A24,0X68C04820,
    0X0F01F010,0X481ED1F6,0XF0206900,0X4A1C0020,0X20006110,0X46034770,0X47702001,0X4603B510,
    0XF0201C48,0XE0260101,0X69004815,0X0010F040,0X61204C13,0X80188810,0XF64AE003,0X4C1320AA,
    0X480F6020,0XF01068C0,0XD1F60F01,0X6900480C,0X0010F020,0X61204C0A,0X68C04620,0X0F14F010,
    0X4620D006,0XF04068C0,0X60E00014,0XBD102001,0X1C921C9B,0X29001E89,0X2000D1D6,0X0000E7F7,
    0X40022000,0X45670123,0XCDEF89AB,0X40003000,0X1FFFF800,0X00000000,
};

static const program_target_t flash_algo_STM32F10X_OPT =
{
    0X20000021,  // Init
    0X2000005B,  // UnInit
    0X20000077,  // EraseChip
    0X200000FB,  // EraseSector
    0X2000013D,  // ProgramPage

    {
        0x20000001,  // BKPT : start of blob + 1
        0x20000C00,  // RSB  : address to access global/static data
        0x20001000,  // RSP  : stack pointer 
    },

    0x20000400,                      // mem buffer location
    0x20000000,                      // location to write prog_blob in target RAM
    sizeof(flash_code_STM32F10X_OPT),       // prog_blob size
    flash_code_STM32F10X_OPT,               // address of prog_blob 
    0x00000400,                      // ram_to_flash_bytes_to_be_written
};

#endif

#ifdef FLASH_CODE_TABLE
&flash_algo_STM32F10X_OPT
#endif

